<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    h5{
      display: -webkit-box;
      width: 100px;
      -webkit-box-orient: vertical;
      -webkit-line-clamp:2;
      text-overflow:ellipsis;
      overflow: hidden;
    }
    #box{
      font-style: italic;/*//oblique;*/
     /* color: #fff;*/
    }
    #box1{
      width: 100px;
      height: 50px;
      text-align: center;
    }
  </style>
</head>
<body>

<span id="box1">nihao</span>
<div id="box">
  你好
</div>

<h5>webkit-line-clamp 是一个 不规范的属性（unsupported WebKit property），它没有出现在 CSS 规范草案中。
  为了实现该效果，它需要组合其他外来的WebKit属性。常见结合属性：
  display: -webkit-box; 必须结合的属性 ，将对象作为弹性伸缩盒子模型显示 。
  -webkit-box-orient 必须结合的属性 ，设置或检索伸缩盒对象的子元素的排列方式 。
  text-overflow，可以用来多行文本的情况下，用省略号“...”隐藏超出范围的文本 。</h5>
<div id="clickId"></div>

<script>
  /*var a = 1 && 2 && undefined && 10
  var b = 0 || null || 1 || 0

  console.log(a,b)

  var i = 0;
  for (;i<10;){
    console.log(i);
    i++;

    if(i == 5){
      break
    }
  }

  var n = 5;
  var num = 1;
  for (var i= 0;i<n;i++){
    num*=10
  }

  var num = 789
  var a = num%10;
  var b = (num-a)%100/10
  var c = (num - a - b*10)/100
  console.log(a,b,c)*/

  /*var c= 0;
  for (var i =2 ;i<100;i++){
    for (var j=1;j<=i;j++){
      if(i%j ==0){
        c++;
      }
    }

    if(c==2){
      console.log(i)
    }

    c =  0
  }*/
  /*function test(){}
  console.log(typeof(1),typeof('1'),
    typeof(true) ,typeof(undefined),typeof(null),
  typeof(['a','b']),typeof({"a":1}),typeof(test))

  console.log(typeof(new Date()))

  console.log(Number(null),Number(undefined),parseInt(null))

  console.log(1,undefined,null)

  var q = '123'
  q++;
  console.log(q)

  var o = 'a'>'b'
  console.log(o)


  var a1 = 2>1>3
  var a2 = 2>1 == 1*/

  // console.log(a1,a2);

  /*var a1 = undefined == 0;
  var a2 = null == 0;
  var a3 = undefined == null;


  console.log(a1,a2,a3)

  console.log(isNaN(undefined))*/

 /* function 1name() {

  }

  function name(){}*/

 /*function test() {
   var a=b=1;
   console.log(a,b)
 }
 test()

 // console.log(a,b)

  function name(a,r,g) {
    console.log(name.name,name.length,arguments[0],arguments.length)
  }
  name(1,2)*/


  /*function t1(a,b) {
    b = b || 8;
    console.log(arguments[1]);
  }

  t1(1,7)
  console.log(t1(1,3))

  function d1(n) {
   if(n == 1){

     return 1
   }

   return n*d1(n-1);

  }
  console.log(d1(5))*/

  console.log("==========================")

  /*function test(a) {
    console.log(a)
    var a = 1;
    console.log(a);
    function a() {

    }

    console.log(a);
    var b = function () {

    }
    console.log(b);
    function d() {

    }

  }
  test(2)*/

/*  var b = 3;
  console.log(a);
  function a(a) {
    console.log(a);
    var a = 2;
    console.log(a);
    function a() {

    }
    var b= 5;
    console.log(b);


  }*/
  /*a(1)
   undefined
  3
  1

  GO {
    a:undefined
    test:function (){}
    c:3
  }
  AO{
    b:undefined
  }*/
  /*2 undefined undefined 4 */
  /**
   *
   * GO
   *  a ->1
   *  test :function(){}
   *  f:undefined
   *
   * AO
   *  e: 1 -> function(){} -> 2
   *  a:undefined
   *  b:undefined
   *  c:undefined
   *
   *
   */

  /*a= 1;
  function test(e) {
    function e() {

    }
    arguments[0] = 2
    console.log(e);
    if(a){
      var b = 3
    }
    var c;
    a=4;
    var a;
    console.log(b);
    f=5;
    console.log(c);
    console.log(a)
  }

  var a;
  test(1)

  var red = (-true) + (+undefined) +'';

  if(red && +undefined -1 +''){
    console.log(typeof(red),red)
    console.log('通过的 ')
  }
  console.log('==============01==================== ')
  function test3() {
    console.log(1)
  }(1)

  var test34 = function () {
    console.log(2)
  }()
  console.log(test34)*/
/*
  console.log("==============12============")

  var fn = (function t1() {
    return 1;
  },function t2() {
    return '2'
  })();

  console.log(fn)
*/


/*var aa = 10;
if(function b() {}){
 /!* (function b() {})*!/
  aa+=typeof(b);
  // console.log(typeof(b),b)
}
console.log(aa)*/


  /*function Car() {
    this.color = 'red';
    return function test() {
      console.log(1)
    }
  }

  var car = new Car()
  car()*/

  /*var a = 2;//new Number(123);
  a.len = 3
  ;
  console.log(a.len)*/

  /*var arr = [1,2];
  arr.length = 4
  console.log(arr,arr[3])

  var str = 'name';
  str.name = 'nihao';
  console.log("=================");
  console.log(str.name,str);*/



  var name = 'lang';
  name+=10;

 //  console.log(name);

  /*var type = new String(typeof(name));
  // console.log("type:"+type);

  if(type.length === 6){
    type.text = 'string'
  }
  console.log(type.text);

  var str = new String('lang');
  if(str.length === 4){
    str.text = 'string';
  }

  console.log(str.text)*/

 /* function Car() {
    this.brand = 'b'
  }
  Car.prototype.name = '12';
  var car = new Car();
  console.log('name' in car);


  console.log("=================");

  function Person() {

  }
  var p = new Person();

  console.log(car instanceof Car);
  console.log(car instanceof Object);
  console.log([] instanceof Array);
  console.log([] instanceof Object)
  console.log({} instanceof Object)


  var sum = (function (n) {
    if(n<=1){
      return 1
    }

    return n+ arguments.callee(n-1);

  })(100);

  console.log(sum);

  function test1() {
    test2()
  }
  function test2() {
    console.log(test2.caller)
  }


  test1()*/
  //console.log()


 /* var a = '1';
  function test() {
    var a= '2';
    this.a = '3';
    console.log(a)
  }

  test()
  new test();
  console.log(a);*/




  console.log("==============");

  /*var a = 5;
  function test3() {
    a = 0;
    console.log(a);
    console.log(this.a);
    var a;
    console.log(a);
  }

  test3();
  new test3();*/

  function name1() {
    this.name = '12'
  }
  function Car() {
    this.carname ='bz'
  }
  Car.prototype.carcolor ='red';
  var car = new Car();
  /*name1.prototype = {
    constructor: car
  }*/
  name1.prototype = car;
  var n1 = new name1()

  console.log(n1,n1.carname,n1.carcolor)


  /*clickId.onclick = function (e) {

    e = e || window.event;
    var target = e.target || e.srcElement,
        tagName = target.tagName.toLowerCase()




    if(e.stopPropagation){
      e.stopPropagation()
    }else {
      e.cancelBubble = true
    }
  }*/


 /*





*/

  // console.log(+undefined,-true,(-true) + (+undefined) + '',+undefined -1 +'')
</script>
</body>
</html>
